import { getAllBrandListService } from '@/api/commodity/common';

export const FORM_ITEMS = [
  {
    prop: 'categoryLevel4Uuids',
    label: '品类',
    type: 'slot',
    slotName: 'category',
    defaultVal: []
  },
  {
    prop: 'skuNo',
    label: 'SKU编码',
    type: 'input',
  },
  {
    prop: 'productName',
    label: '商品名称',
    type: 'input'
  },
  {
    prop: 'brandUuid',
    label: '品牌',
    type: 'select',
    remote: true,
    remoteMethod: getAllBrandListService,
    paramKey: 'brandName',
    optionKeys: { valueKey: 'brandUuid', labelKey: 'brandName' },
  },
  {
    prop: 'areaId',
    label: '区域',
    type: 'select',
    options: [],
    clearable: true,
    filterable: true
  },
]

export const TABLE_COLUMNS = [
  {
    title: '品类',
    key: 'categoryPath',
    width: 220
  },
  {
    title: 'SKU编码',
    key: 'skuNo'
  },
  {
    title: '商品名称',
    key: 'productName'
  },
  {
    title: '规格',
    key: 'spec'
  },
  {
    title: '计量单位',
    key: 'unitName'
  },
  {
    title: '品牌',
    key: 'brandName'
  },
  {
    title: '区域',
    key: 'areaName'
  },
  {
    title: '订货频次',
    key: 'orderFrequency'
  },
  {
    title: '订货数量',
    key: 'orderQuantity'
  },
  {
    title: '订货金额',
    key: 'orderAmount'
  },
]
